﻿namespace Windows32
{
    using System;
    using System.Drawing;

    public class CaptureMouseMoveEventArgs : EventArgs
    {
        private bool bolCancel = false;
        private Point myCurrentPosition = Point.Empty;
        private MouseCapturer mySender = null;
        private Point myStartPosition = Point.Empty;

        public CaptureMouseMoveEventArgs(MouseCapturer sender, Point sp, Point cp)
        {
            this.mySender = sender;
            this.myStartPosition = sp;
            this.myCurrentPosition = cp;
            this.bolCancel = false;
        }

        public bool Cancel
        {
            get
            {
                return this.bolCancel;
            }
            set
            {
                this.bolCancel = value;
            }
        }

        public Point CurrentPosition
        {
            get
            {
                return this.myCurrentPosition;
            }
            set
            {
                this.myCurrentPosition = value;
            }
        }

        public int DX
        {
            get
            {
                return (this.myCurrentPosition.X - this.myStartPosition.X);
            }
        }

        public int DY
        {
            get
            {
                return (this.myCurrentPosition.Y - this.myStartPosition.Y);
            }
        }

        public MouseCapturer Sender
        {
            get
            {
                return this.mySender;
            }
        }

        public Point StartPosition
        {
            get
            {
                return this.myStartPosition;
            }
            set
            {
                this.myStartPosition = value;
            }
        }
    }
}

